SNCheckInBySN

SoftwareShield ClientProtector COM Component > ClientProtector (SSCProtector) Reference > SNCheckInBySN

## SNCheckInBySN

The SNCheckInBySN function attempts to perform an automated Check-In operation on the identified Serial Number.

###### Syntax

HRESULT SNCheckInBySN ( BSTR ASerialNumber, long * return_code ) ;

###### Parameters

ASerialNumber

[IN] This is a string value that represents the Serial Number you wish to Check-In.

return_code

[OUT] This is (a pointer to) a numeric value that returns with the outcome of the operation. See RETURNCODES for a complete list of possible values.

###### Remarks

Note: This function is illustrated in the SoftwareShield Flowcharts - (see flow chart #4).

The SNCheckInBySN function attempts to perform an automated Check-In operation on the identified Serial Number.

If the license has not been correctly initialized with a call to StartUp, the return_code will return with FALSE_LICENSE_NOT_INITIALIZED.

If the AuthDefID belongs to a Release Copy-Protection definition, execution continues as though this was a call to SNCheckInCopyProtection please see the documentation on that function for exact details.

Otherwise, if the AuthDefID parameter is invalid or the associated Authorization Definition does not contain any Serial Number, the return_code will return with FALSE_NO_SN.

If the CheckPoint URL is inside the license is empty, the return_code parameter will return with FALSE_NO_CHECKPOINT_URL.

If the CheckPoint server can not be contacted (using the CheckPoint URL and any proxy server information stored inside the license) the return_code will return with FALSE_CONNECTION_FAILURE.

Otherwise, the CheckPoint server will be invoked to remotely Check-In the associated Serial Number stored inside the Authorization Definition.

If Serial Number is invalid (on the server) the return_code will return with FALSE_INVALID_SN.

If there have never been any activations consumed before on this Serial Number, the return_code will return with FALSE_NO_ACTIVATIONS.

Otherwise, the consumed count is reduced by one in the CheckPoint database and the operation succeeds.

Back on the client machine, if this return from the CheckPoint operation is success, the associated Authorization Definitions state is set to Activated = false, stored parameter = 0, stored Serial Number = "" and the return_code parameter returns with FALSE_CODE_NOT_ACTIVATED - which means that the Check-In was successful, and the associated Authorization Definition is no longer activated.

The flow of control of this function is illustrated in the SoftwareShield ClientProtector Control Flow Charts. Please review them to get a precise picture of what this function does.

###### Return Value

As with all COM function calls they return an HRESULT. HRESULT is a data type that is a 32-bit error or warning code. Check your compilers documentation for information on interpreting the HRESULT value.

###### Function Information

Exposed By Interface: | "ISSCProtector"
Exposed In COM Server Binaries: | "SSCProt.dll" and "SSCProtD.dll"